﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Compilation;
using System.Web.Routing;

namespace Harrby.Web.Routing
{
    public class PageRouteHandler : System.Web.Routing.IRouteHandler
    {
        public System.Web.IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            Harrby.Web.UI.Page page;
            page = BuildManager.CreateInstanceFromVirtualPath(PageVirtualPath, typeof(Harrby.Web.UI.Page)) as Harrby.Web.UI.Page;
            return page;
        }
        public string PageVirtualPath { get; set; }
    }
}
